<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var arr = [1,2,3,4,2,1,3,4,5]
			for(var i = 1 ; i<=arr.length ; i++){
				for(var a = 0 ; a < i;a++){
					if(arr[i] == arr[a]){
						arr.splice(i,1);
						i--;
						break;
					}
				}
			}
			// for(var i = 0 ; i <= arr.length ; i++){
			// 	if(arr[i] == ""){
			// 		arr.splice(i,1);
			// 		i--;
			// 	}
			// }
			console.log(arr);
		</script>
	</head>
	<body>
	</body>
</html>
